<template>
    <div>
        <van-nav-bar
                fixed
                :title="head"
                left-text=""
                right-text=""
                left-arrow
                @click-left="$router.back()"
                @click-right="onClickRight"
        />
    </div>
</template>

<script>
import Vue from 'vue';
import { NavBar } from 'vant';

Vue.use(NavBar);
export default {
    name: "nav-bar",
    props: ['head'],
    methods: {
        onClickLeft() {
            this.$router.push('/list');
            // this.$router.go(-1);
        },
        onClickRight() {
            Toast('按钮');
        }
    }
}
</script>

<style scoped>
    .van-nav-bar__text,.van-icon{
        color: black;
    }
</style>
